<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
            <title>花瓣网注册</title>
            <style>
                body{
                    background:url('__PUBLIC__/img/bg.gif');
                }
                .log{ 
                    background:url('__PUBLIC__/img/reg/loge.png')
                }
            </style>
            <css file='__PUBLIC__/css/reg.css' />
             <css file='__PUBLIC__/css/com.css'>
            <jquery />
            <script>
                $(function(){
                    $("img[name='submv']").click(function(){
                        $(".mv").slideDown(600);
                    });
                    $(".cosl").click(function(){
                        $(".mv").slideUp(600);
                    })
                    $("input[name='email']").focus(function(){
                         $('.email_span').text("");
                    })
                $("input[name='email']").blur(function(){
                    var dat=$("input[name='email']").val();
                    if(valid_email(dat)){
                         var dat=$("input[name='email']").val();
                       $.post("__CONTROL__/reg_yan",{dat:dat},function(dat){
                       if(dat==2){
                         $('.email_span').text("邮箱已存在");
                       }
                     })
                    }else{
                          $('.email_span').text("邮箱格式不正确");
                    }
                    
                    function valid_email(dat) {
                      var patten = new RegExp(/\w+((-w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+/);
		     return patten.test(dat);
	            }
                    
                   
                })
                $("input[name='password1']").blur(function(){
                   $pwd1=$("input[name='password']").val();
                   $pwd2= $("input[name='password1']").val();
                   if($pwd1!=$pwd2){
                      $(".pwd_span").text('两次密码不相同');
                      
                   }
                })
           
       })
	
            </script>
    </head>
    <body>
        <div class='fanhui'>
            <a href='__CONTROL__/index'><img style='cursor:pointer' src='__PUBLIC__/img/reg/fanhui.png' /></a>
        </div>
        <div class='log'>
            <span ><img  name='submv' src='__PUBLIC__/img/reg/mv.png' /></span>	
        </div>

        <div class="mv" style="display: none;">
            <span class='cosl'>关闭视频</span>
            <embed width="480" align="middle" height="400" flashvars="winType=index" type="application/x-shockwave-flash" quality="high" allowfullscreen="true" src="http://player.youku.com/player.php/sid/XMzIxMjU2OTY4/v.swf" />
        </div>	
        <div class='biaoti'>
            <h2>欢迎您注册花瓣网，爱分享-爱采集！</h2>
        </div>
        <form action="__CONTROL__/regs" method="post">
            <div class='reg'>
                <div class='user_img'>

                    <upload size='1' width='150px' height="150px" name='user_img' limit="1" text="上传头像">
                </div>
                <div class='biaodan'>

                    <ul>

                        <li>用户昵称:<br /><input type='text' name='username'/></li>
                        <li>登录邮箱:(用于登录)<br /><input type='text' name='email'/><span style="color:red;font-size:12px" class='email_span'></span></li>
                        <li>密 码:<br /><input type='password' name='password'/></li>
                        <li>确认密码:<br /><input type='password' name='password1'/><span style="color:red;font-size:12px;" class='pwd_span'></span></li>
                        <li><input type='submit' value='提交'/></li>
                    </ul>

                </div>
            </div>
            </from>
    </body>
</html>